define(["../logic/commonpage", "../common/common"], function (pluginClass, c) {
    return {
        pluginClass: pluginClass,
        style: {
            backgroundColor: c.bodyColor
        },
        nocache: true,
        root: ["mainvlayout", "time_dropdown_wrap"],
        components: {
            leftrepeat_wrap:{
                type:"view",
                style:{
                    position:"absolute",
                    top:0,
                    left:0,
                    right:0,
                    bottom:0,
                    overflow:"auto"
                },
                root:["leftrepeat"]
            },
            mainvlayout:{
                type:"hbox",
                style:{
                    height: "100%",
                    width: "100%"
                },
                items:[{
                    root: ["leftrepeat_wrap"],
                    style: {
                        width: "260px",
                        backgroundColor:"#fff",
                        overflow:"auto",
                        paddingTop:"20px",
                        borderRight:"1px solid #e2e2e2"
                    }
                },
                {
                    root: ["rightLayout"],
                    style: {

                    }
                }
                ]
            },
            leftrepeat_nodata:{
                type:"text",
                text:"您还没有加入任何团队"
            },
            leftrepeat:{
                type:"repeat",
                selectedMode:"s",
                ref:true,
                style:{
                    fontSize:"12px"
                },
                nodata:"leftrepeat_nodata",
                root:["group_row"]
            },
            group_row:{
                type:"view",
                style:{
                    overflow:"hidden",
                    cursor:"pointer",
                    paddingTop:"10px",
                    paddingBottom:"10px",
                    paddingLeft:"15px",
                    paddingRight:"15px",
                },
                selectedClassName:"group-condition-row-selected",
                root:["group_row_left","group_row_right"]
            },
            group_row_left:{
                type:"view",
                style:{
                    float:"left",
                    width:40
                },
                root:["group_logo"]
            },
            group_logo:{
                type:"image",
                src_bind:"logo",
                defaultSrc:"./imgs/grouplogo.png",
                style:{
                    width:"40px",
                    marginLeft:"10px",
                    borderRadius:"100%",
                    height:"40px"
                }
            },
            group_row_right:{
                type:"view",
                style:{
                    marginLeft:"65px"
                },
                root:["condition_row_top","condition_row_bottom"]
            },
            condition_row_bottom:{
                type:"view",
                style:{
                    overflow:"hidden",
                    color:"#9E9E9E"
                },
                root:["group_row_count","group_row_updatetime"]
            },
            condition_row_top:{
                type:"view",
                style:{
                    overflow:"hidden"
                },
                root:["condition_group_name","condition_group_count"]
            },
            group_row_count:{
                type:"text",
                text_bind:"diaryNum",
                style:{
                    float:"left",
                    marginRight:10
                },
                nextText:"篇日志"
            },
            group_row_updatetime:{
                type:"text",
                style:{
                    float:"left"
                },
                text_bind:"lastUpdateTime"
            },
            condition_group_name:{
                type:"text",
                style:{
                    float:"left",
                    color:"#333333",
                    fontSize:12
                }
            },
            condition_group_count:{
                type:"text",
                style:{
                    color:"#9E9E9E",
                    fontSize:12
                }
            },
            rightLayout: {
                type: "vbox",
                style: {
                    height: "100%",
                    width: "100%"
                },
                items: [
                    {
                        root: ["main_header"],
                        style: {
                            height: "57px"
                        }
                    },

                    {
                        root: ["main_body"],
                        style: {

                        }
                    }
                ]
            },

            main_header: {
                type: "view",
                className: "yy-unselect",
                style: {
                    background: "#fff",
                    borderBottom: "1px solid #eee",
                    height: "100%",
                    lineHeight: "50px",
                    width: "100%",
                    paddingRight: "20px"
                },
                root: ["temp_dropdown_btn", "time_dropdown_btn","depart_dropdown_btn", "create_btn"]
            },

            depart_dropdown_btn: {
                type: "view",
                className: "dc-condition-dropdown",
                style: {
                    height: "33px",
                    lineHeight: "25px",
                    paddingLeft: 10,
                    marginLeft: "10px",
                    display: "inline-block",
                    verticalAlign: "middle",
                    paddingRight: 10,
                    border: "1px solid #eee",
                    borderRadius: "4px"
                },
                root: ["depart_dropdown_icon", "depart_dropdown_dp_icon", "depart_dropdown"]
            },
            depart_dropdown: {
                type: "dropdown",
                ref: true,
                style: {
                    position: "absolute",
                    top: 6,
                    left: 0,
                    visibility: "hidden"
                },
                dropDownStyle: {
                    width: 200
                },
                delayLoadData: true,
                title: "-",
                displayMember: "deptName"
            },

            depart_dropdown_icon: {
                type: "icon",
                text: "全部部门",
                ref: true,
                iconStyle:{
                    color: "#aaaaaa",
                    fontSize:"17px"
                },
                style: {
                    color: "#666",
                    verticalAlign: "middle",
                    display: "inline-block"
                },
                textStyle: {
                    fontSize: "13px",
                    marginLeft: 9
                }
            },
            depart_dropdown_dp_icon: {
                type: "icon",
                font: "FontAwesome_f107",
                iconStyle:{
                    color: "#aaaaaa",
                    fontSize:15
                },
                style: {
                    color: "#666",
                    marginLeft: 4,
                    verticalAlign: "middle",
                    display: "inline-block"
                }
            },


            create_btn: {
                type: "button",
                title: "创建日志",
                mode: 2,
                style: {
                    backgroundColor: "#1FDA9A",
                    float: "right",
                    top: 11,
                    height: 33,
                    lineHeight: "33px"
                },
            },

            team_dropdown_btn: {
                type: "view",
                className: "dc-condition-dropdown",
                style: {
                    height: "33px",
                    lineHeight: "25px",
                    paddingLeft: 10,
                    marginLeft: "10px",
                    display: "inline-block",
                    verticalAlign: "middle",
                    paddingRight: 10,
                    border: "1px solid #eee",
                    borderRadius: "4px"
                },
                root: ["team_dropdown_icon", "team_dropdown_dp_icon", "team_dropdown"]
            },
            team_dropdown: {
                type: "dropdown",
                ref: true,
                style: {
                    position: "absolute",
                    top: 6,
                    left: 0,
                    visibility: "hidden"
                },
                dropDownStyle: {
                    width: 200
                },
                delayLoadData: true,
                title: "-",
                displayMember: "groupName"
            },

            team_dropdown_icon: {
                type: "icon",
                text: "全部团队",
                ref: true,
                font: "icomoon_e9e9",
                iconStyle:{
                    color: "#aaaaaa",
                    fontSize:"17px"
                },
                style: {
                    color: "#666",
                    verticalAlign: "middle",
                    display: "inline-block"
                },
                textStyle: {
                    fontSize: "13px",
                    marginLeft: 9
                }
            },
            team_dropdown_dp_icon: {
                type: "icon",
                font: "FontAwesome_f107",
                iconStyle:{
                    color: "#aaaaaa",
                    fontSize:15
                },
                style: {
                    color: "#666",
                    marginLeft: 4,
                    verticalAlign: "middle",
                    display: "inline-block"
                }
            },


            temp_dropdown_btn: {
                type: "view",
                className: "dc-condition-dropdown",
                style: {
                    height: "33px",
                    lineHeight: "25px",
                    paddingLeft: 10,
                    marginLeft: "10px",
                    display: "inline-block",
                    verticalAlign: "middle",
                    paddingRight: 10,
                    border: "1px solid #eee",
                    borderRadius: "4px"
                },
                root: ["temp_dropdown_icon", "temp_dropdown_dp_icon", "temp_dropdown"]
            },
            temp_dropdown: {
                type: "dropdown",
                ref: true,
                style: {
                    position: "absolute",
                    top: 6,
                    left: 0,
                    visibility: "hidden"
                },
                dropDownStyle: {
                    width: 200
                },
                delayLoadData: true,
                title: "-",
                displayMember: "title"
            },
            temp_dropdown_icon: {
                type: "icon",
                ref: true,
                text: "全部模板",
                font: "icomoon_e921",
                style: {
                    color: "#666",
                    verticalAlign: "middle",
                    display: "inline-block"
                },
                iconStyle:{
                    color:"#aaaaaa",
                    fontSize:15
                },
                textStyle: {
                    fontSize: "13px",
                    marginLeft: 5
                }
            },
            temp_dropdown_dp_icon: {
                type: "icon",
                font: "FontAwesome_f107",
                style: {
                    color: "#aaa",
                    marginLeft: 4,
                    fontSize:15,
                    verticalAlign: "middle",
                    display: "inline-block"
                }
            },


            time_dropdown_btn: {
                type: "view",
                className: "dc-condition-dropdown",
                style: {
                    height: "33px",
                    lineHeight: "25px",
                    paddingLeft: 10,
                    marginLeft: "10px",
                    display: "inline-block",
                    verticalAlign: "middle",
                    paddingRight: 10,
                    border: "1px solid #eee",
                    borderRadius: "4px"
                },
                root: ["time_dropdown_icon", "time_dropdown_dp_icon"]
            },

            time_dropdown_icon: {
                type: "icon",
                text: "日期",
                ref: true,
                font: "icomoon_e920",
                style: {
                    color: "#666",
                    verticalAlign: "middle",
                    display: "inline-block"
                },
                iconStyle:{
                    color:"#aaaaaa",
                    fontSize:18
                },
                textStyle: {
                    fontSize: "13px",
                    marginLeft: 1,
                    paddingTop:2
                }
            },
            time_dropdown_dp_icon: {
                type: "icon",
                font: "FontAwesome_f107",
                style: {
                    color: "#aaa",
                    marginLeft: 4,
                    fontSize:15,
                    verticalAlign: "middle",
                    display: "inline-block"
                }
            },

            time_dropdown_wrap: {
                type: "view",
                ref: true,
                className: "dc-time-wrap displaynone",
                style: {
                    position: "absolute",
                    width: 280,
                    zIndex: 10,
                    top: 47,
                    left: 140,
                    height: 115,
                    backgroundColor: "#fff"
                },
                root: ["time_dropdown_wrap_top", "time_dropdown_wrap_bottom"]
            },
            time_dropdown_wrap_bottom: {
                type: "view",
                style: {
                    textAlign: "right",
                    paddingTop: 13
                },
                root: ["time_dropdown_clearbtn", "time_dropdown_okbtn"]
            },
            time_dropdown_clearbtn: {
                type: "button",
                title: "清空",
                style: {
                    borderColor: "#DDDDDD",
                    color: "#333",
                    height: 33,
                    marginRight: 10,
                    width: 63
                }
            },
            time_dropdown_okbtn: {
                type: "button",
                title: "确定",
                style: {
                    height: 33,
                    color: "#0FD084",
                    borderColor: "#0FD084",
                    marginRight: 17,
                    width: 63
                }
            },
            time_dropdown_wrap_top: {
                type: "view",
                style: {
                    textAlign: "center",
                    paddingTop: 18
                },
                root: ["time_condition_start", "time_dropdown_label", "time_condition_end"]
            },
            time_dropdown_label: {
                type: "text",
                text: "至",
                style: {
                    display: "inline-block",
                    verticalAlign: "middle",
                    fontSize: 13,
                    color: "#333",
                    marginRight: 5,
                    marginLeft: 5
                }
            },
            time_condition_start: {
                type: "datepicker",
                ref: true,
                style: {
                    width: 110,
                    display: "inline-block",
                    verticalAlign: "middle"
                }
            },
            time_condition_end: {
                type: "datepicker",
                ref: true,
                style: {
                    width: 110,
                    display: "inline-block",
                    verticalAlign: "middle"
                }
            },

            main_body: {
                type: "view",
                style: {
                    width: "100%",
                    height: "100%",
                    overflow: "hidden",
                },
                root: ["main_body_inner"]
            },
            main_body_inner: {
                type: "view",
                style: {
                    height: "100%",
                    overflow: "auto",
                    paddingTop:"8px",
                    backgroundColor:"#f5f5f5"
                },
                root: ["table"]
            },
            nodata:{
                type:"icon",
                style:{
                    margin:"130px auto",
                    fontSize:14,
                    color:"#999"
                },
                textStyle:{
                    marginTop:16
                },
                src:"./imgs/nodata1.png",
                text:"没有相关数据"
            },
            table: {
                type: "table",
                ref: true,
                nodata:"nodata",
                ajaxConfig: {
                    url: "/diaryQuery/getAllDiary",
                    type: "GET",
                    timeout:10000000,
                    pageNumKey: "pageNum",
                    pageSize: 20,
                    data: {
                        pageSize: 20,
                        pageNo: 1,
                        range: 0
                    }
                },
                columns: [
                    {
                        headerText: " ",
                        cell: ["row_view", 'bottom_line'],

                    }
                ]
            },
            row_view: {
                className:"commonpage_row_view",
                style: {
                    backgroundColor: '#fff',
                    paddingLeft: 30,
                    paddingRight: 30,
                    overflow: "hidden",
                    paddingTop: 14,
                    paddingBottom: 14
                },
                type: 'view',
                root: ['avatar', 'right_view']
            },
            bottom_line: {
                type: 'view',
                style: {
                    width: 84,
                    height: 1,
                    backgroundColor: '#fff'

                }
            },
            right_view: {
                style: {
                    paddingLeft: 54,
                    position:'relative',
                },
                type: 'view',
                root: ["name_wrap", 'when', 'where', 'label_texts', 'form_content', 'atPersons','images', 'files', 'position','operation_group']
            },
            name_wrap:{
                type:"view",
                style:{
                    lineHeight:"20px"
                },
                root:['user_name','range_icon','delete_icon']
            },
            delete_icon:{
                type:"button",
                style:{
                    position:"absolute",
                    right:"-10px",
                    display:"inline-block",
                    fontSize:"13px",
                    width:"62px",
                    height:"30px",
                    border:"1px solid #ddd",
                    color:"#666",
                    cursor:"pointer"
                },
                title:"删除"
            },

            del_dialog: {
                type: 'view',
                style: {
                    backgroundColor: "#fff",
                    overflow: "hidden",
                    borderRadius: "4px",
                    width: "300px",
                    height: "165px",
                    paddingTop: "44px",
                    paddingBottom: "10px",
                    margin: "auto"
                },
                root: ["del_dialog_label", "del_dialog_btn_wrap"]
            },
            del_dialog_label: {
                type: "text",
                style: {
                    textAlign: "center",
                    fontSize: "16px",
                    color: "#666666"
                },
                text: "确定要删除吗？"
            },
            del_dialog_btn_wrap: {
                type: "view",
                style: {
                    marginTop: "28px",
                    textAlign: "center"
                },
                root: ["del_dialog_cancelbtn", "del_dialog_okbtn"]
            },
            del_dialog_cancelbtn: {
                type: 'button',
                mode: 1,
                style: {
                    width: "80px",
                    height: "32px",
                    lineHeight: "32px",
                    border: "1px solid #eeeeee",
                    color: "#666666",
                    fontSize: "14px"
                },
                title: "取消"
            },
            del_dialog_okbtn: {
                type: 'button',
                mode: 2,
                ref: true,
                style: {
                    width: "80px",
                    height: "32px",
                    lineHeight: "32px",
                    backgroundColor: "#1FDA9A",
                    fontSize: "14px",
                    marginLeft: "20px"
                },
                title: "确定"
            },

            atPersons:{
                type:"text",
                text_bind: 'atStr',
                preText:"",
                style: {
                    marginBottom: 5,
                    fontSize: 14,
                    color: "#29B6F6",
                }
            },
            position: {
                type: 'icon',
                text_bind: 'location',
                font: 'icomoon_e91f',
                style: {
                    marginTop: 5,
                    fontSize: 12,
                    color: "#999999",
                },
                iconStyle:{
                    fontSize: 14,
                    color: "#aaaaaa",
                }

            },
            operation_group:{
                type: 'view',
                style:{
                    fontSize:14,
                    color:"#787878"
                },
                root:['reply', 'collect', 'like']
            },
			collect: {
				type: 'view',
				style: {
					display: 'inline-block',
					marginRight: '30px',
					cursor: 'pointer'
				},
				root: ['collect_icon', 'collect_text']
			},
			collect_icon: {
				type: 'icon',
				selectedClassName: 'collect-selected',
				style: {
					display: 'inline-block',
					marginRight: '5px',
					color: '#b8b8b8'
				},
				font: 'icomoon_e936'
			},
			collect_text: {
				type: 'text',
				style:{
                    display: 'inline-block',
                    verticalAlign: 'middle',
                    color:'#999',
                    fontSize:12
                },
                text:'收藏'
			},
            reply:{
                type:'view',
                style:{
                    display:'inline-block',
                    marginRight:'30px',
                    cursor:'pointer'
                },
                root:['reply_icon','reply_text']
            },
            reply_icon:{
                type:'icon',
                style:{
                    display: 'inline-block',
                    marginRight:'5px',
                    color:'#b8b8b8'
                },
                font: 'icomoon_e902',
            },
            reply_text:{
                type:'text',
                style:{
                    display: 'inline-block',
                    verticalAlign: 'middle',
                    color:'#999',
                    fontSize:12
                },
                text:'回复'
            },
            like:{
                type:'view',
                style:{
                    display:'inline-block',
                    cursor:'pointer'
                },
                root:['like_icon','like_text']
            },
            like_icon:{
                type:'icon',
                selectedClassName:"like-selected",
                style:{
                    display: 'inline-block',
                    marginRight:'5px',
                    color:'#b8b8b8'
                },
                font: 'icomoon_e926',
            },
            like_text:{
                type:'text',
                ref:true,
                className:'like_text',
                style:{
                    display: 'inline-block',
                    verticalAlign: 'middle',
                    color:'#999',
                    fontSize:12
                },
                text:'赞'
            },
            files: {
                type: 'repeat',
                ref: true,
                items_bind: "files",
                style: {
                    width: '100%'
                },
                root: ['file_repeat']
            },
            file_repeat: {
                type: 'view',
                style: {
                    padding: '8px 8px 8px 15px',
                    lineHeight: '30px',
                    height: '46px',
                    width: '100%',
                    backgroundColor: '#F7F7F7'
                },
                root: ['file_type_icon', 'file_download', 'file_name']

            },
            file_download: {
                style: {
                    color: '#1fda9a',
                    fontSize: 13,
                    float: 'right',
                    lineHeight: '30px',
                    marginRight: 10,
                    cursor: 'pointer'
                },
                iconStyle:{
                    fontSize:18
                },
                type: 'icon',
                font: 'icomoon_e91e',
                text: '下载'
            },
            file_type_icon: {
                type: 'image',
                src_bind: 'iconPath',
                style: {
                    width: '15px',
                    float: 'left',
                    height: '15px',
                    margin: '7px 0'
                },
                imgStyle: {
                    lineHeight: '15px',
                    position: 'absolute',
                    top: '0'
                }
            },
            file_name: {
                style: {
                    marginLeft: 20,
                    color: '#666666',
                    fontSize: 13,
                    marginRight: 60
                },
                className: 'omit',
                type: 'text',
                text_bind: "fileName",
            },
            images: {
                type: 'repeat',
                ref: true,
                items_bind: "images",
                itemStyle: {
                    textAlign: "center",
                    display: 'inline-block'
                },
                style: {
                    width: 360
                },
                root: ['image_repeat']

            },
            image_repeat: {
                style: {
                    height: 103,
                    width: 102,
                    marginRight: 10,
                    marginBottom: 2,
                },
                needAdapte:true,
                type: 'image',
                src_bind: 'fileKey'
            },
            form_content: {
                type: 'repeat',
                ref: true,
                items_bind: 'content',
                itemStyle: {

                },

                style: {
                    marginBottom: 4,
                    marginTop: 8,
                    lineHeight:"19px",
                    width: '100%',
                    cursor: 'pointer'
                },
                root: ['form_content_item_text']
            },
            form_content_item_text: {
                type: 'text',
                className: 'commonpage_form_content_item_text',
                text_bind: 'content',
                preTextStyle:{
                    color:"#333",
                    display:"block"
                },
                noHoverTitle:true,
                style: {
                    fontSize: 14,
                    lineHeight:"21px",
                    color: '#828282',
                    paddingBottom: '4px'

                }
            },
            avatar: {
                type: 'image',
                style: {
                    position: 'absolute',
                    width: 44,
                    textAlign:"center",
                    lineHeight:"44px",
                    height: 44,
                    borderRadius: '100%'
                },
                src_bind: 'avatar',
                title_bind: "userName"
            },
            user_name: {
                style: {
                    fontSize: 14,
                    color: '#333',
                    cursor: 'pointer',
                    display:"inline-block",
                    verticalAlign:"middle"
                },
                type: 'text',
                text_bind: "userName"
            },
            range_icon:{
                type:"icon",
                font:"icomoon_e924",
                style:{
                    display:"inline-block",
                    verticalAlign:"top",
                    cursor:"pointer",
                    lineHeight:"20px",
                    color:"#dfe2e2"
                }
            },
            when: {
                ref: true,
                style: {
                    display: 'inline-block',
                    verticalAlign:"top",
                    fontSize: 12,
                    color: '#999'
                },
                type: 'text',
                text_bind: 'createTime'
            },
            where: {
                ref: true,
                style: {
                    display: 'inline-block',
                    fontSize: 12,
                    verticalAlign:"top",
                    marginLeft: 10,
                    color: '#999'
                },
                type: 'text',
                text_bind: 'source',
            },
            label_texts: {
                type: "view",
                ref: true,
                direction: "row",
                style:{
                    marginTop:-15
                },
                root: ["label_text_left", "label_text_right"]
            },
            label_text_left: {
                type: 'text',
                text_bind: 'templateName',
                style: {
                    borderRadius: 4,
                    padding: '0 4px',
                    fontSize: 12,
                    color: '#fff',
                    backgroundColor: '#1FDA9A',
                    marginRight: 5,
                    display: 'inline-block'
                }
            },
            label_text_right: {
                type: 'text',
                style: {
                    borderRadius: 4,
                    padding: '0 4px',
                    fontSize: 12,
                    color: '#fff',
                    backgroundColor: '#1FDA9A',
                    marginRight: 5,
                    display: 'inline-block'
                }
            },
            range_dialog:{
                type:"view",
                style:{
                    width:"429",
                    margin:"auto",
                    backgroundColor:"#fff"
                },
                root:["range_dialog_header","range_dialog_body"]
            },
            range_dialog_header:{
                type:"view",
                style:{
                    backgroundColor:"#f2f3f4",
                    height:"43px",
                    lineHeight:"43px"
                },
                root:["range_dialog_header_title","range_dialog_header_close"]
            },
            range_dialog_header_title:{
                type:"text",
                text:"日志可见范围",
                style:{
                    fontSize:13,
                    color:"#666",
                    marginLeft:20
                }
            },
            range_dialog_header_close:{
                type:"icon",
                font:"icomoon_e90a",
                style:{
                    color:"#ccc",
                    cursor:"pointer",
                    position:"absolute",
                    right:10,
                    top:-3
                }
            },
            range_dialog_body:{
                type:"view",
                style:{
                    minHeight:370,
                    maxHeight:420,
                    overflow:"auto",
                    backgroundColor:"#fff"
                },
                root:["rangetree"],
                className: "range_dialog_body"
            },
            rangetree:{
                type:"rangetree",
                className: "rangetree"
            }
        }
    };
});
